<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>index</title>
	<hdjs/>
</head>
<body>
	<div class="wrap">
		<div class="title-header">模版列表</div>
		<ul>
			<list from='$dirs' name='$d'>					
				<li <if value="$d.current">class='current'</if> dir='{$d.filename}'>
					<img src="{$d.image}" {$d.current}>
					<p>{$d.config.author.0}</p>
					<p>{$d.config.email.0}</p>
				</li>
			</list>			
		</ul>
		<style type="text/css">
			ul li{
				float: left;
				border: 2px solid #eee;
				margin:10px;
				cursor: pointer;
			}
			
			ul li img{
				width:200px;
				height: 200px;
				opacity: 0.3;
			}
			ul li.current img{
				opacity: 1;
			}
		</style>
		<script type="text/javascript">
		$('ul li').click(function(){
			var dirName=$(this).attr('dir');
			$.post(CONTROLLER+'&a=set',{dir:dirName},function(json){
				alert(json.message);
				location.reload(true);
			},'json')
		})
		</script>
	</div>

</body>
</html>